Leetcode 564 - Find The Closest Palindrome - Java